package com.swiftride.pojo.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * <p>
 * 司机合同表
 * </p>
 *
 * @author wy
 * @since 2024-08-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_driver_contract")
@Schema(name = "DriverContract对象", description = "司机合同表")
public class DriverContract implements Serializable {

    private static final long serialVersionUID = 1L;

    public void init() {
        this.createTime = new Date();
        this.contractStatus = 0;
        this.uploadTime = new Date();
        this.deleted = false;
        this.version = 0;
    }

    @Schema(name = "id", description = "主键id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(name = "name", description = "司机姓名")
    @TableField("name")
    private String name;

    @Schema(name = "number", description = "合同编号")
    @TableField("number")
    private String number;

    @Schema(name = "contractStatus", description = "合同状态:0-已上传 1-已作废")
    @TableField("contract_status")
    private Integer contractStatus;

    @Schema(name = "filePath", description = "文件地址")
    @TableField("file_path")
    private String filePath;

    @Schema(name = "uploadName", description = "上传人姓名")
    @TableField("upload_name")
    private String uploadName;

    @Schema(name = "uploadTime", description = "上传时间")
    @TableField("upload_time")
    private Date uploadTime;

    @Schema(name = "createTime", description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @Schema(name = "updateTime", description = "修改时间")
    @TableField("update_time")
    private Date updateTime;

    @Schema(name = "deleted", description = "逻辑删除")
    @TableField("deleted")
    @TableLogic
    private Boolean deleted;

    @Schema(name = "version", description = "乐观锁")
    @TableField("version")
    @Version
    private Integer version;

}
